Skip to content

Fix Docker healthcheck to use curl instead of Python requests#8

Closed
Copilot wants to merge 2 commits intodevelopfrom
copilot/sub-pr-7
Closed

Fix Docker healthcheck to use curl instead of Python requests#8
Copilot wants to merge 2 commits intodevelopfrom
copilot/sub-pr-7

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

Addresses review feedback on #7: the healthcheck command using Python's requests library could fail before application initialization.

Changes

  • Added curl to system dependencies
  • Replaced Python-based healthcheck with curl -f
# Before
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
    CMD python -c "import requests; requests.get('http://localhost:8000/health')" || exit 1

# After  
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
    CMD curl -f http://localhost:8000/health || exit 1

System-level healthchecks are more reliable and don't depend on application runtime state.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Yosoyepa <49212112+Yosoyepa@users.noreply.github.com>
@Yosoyepa Yosoyepa closed this Nov 7, 2025
Copilot AI changed the title [WIP] Refactor CodeGuard UNAL platform to address review feedback Fix Docker healthcheck to use curl instead of Python requests Nov 7, 2025
Copilot AI requested a review from Yosoyepa November 7, 2025 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants